<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>ValueChangeListeners, validations, cycle de vie de la
requête</title>
<link rel="stylesheet" type="text/css"
	href="<%= request.getContextPath() %>/css/basic.css" />
</head>
<body>
<f:view>
	<h:panelGroup id="body">
		<f:verbatim>
			<h2>ValueChangeListeners, validations, cycle de vie de la
			requête</h2>
		</f:verbatim>
		<font color="red"><h:messages /></font>
		<h:form id="f1">
			<h:panelGrid columns="3" border="1" rules="all">
				<h:panelGroup>
					<h:outputLabel value="foobar" for="ip1"></h:outputLabel>
					<f:verbatim>, une valeur entre 5 et 10</f:verbatim>
				</h:panelGroup>
				<h:inputText value="#{itemSample.dummyValue}" id="ip1"
					required="true">
					<f:validateLongRange minimum="5" maximum="10" />
				</h:inputText>
				<h:message id="foobarError" for="ip1" styleClass="error" />
				<h:panelGrid>
					<h:outputLabel value="la liste s'allonge" for="selone_menu_options" />
					<h:selectOneMenu id="selone_menu_options" value="o2"
						styleClass="selectOneMenu" onchange="submit()" immediate="true"
						valueChangeListener="#{itemSample.menuChanged}">
						<f:selectItem itemValue="" itemLabel="choose" />
						<f:selectItems value="#{itemSample.optionItems}" />
					</h:selectOneMenu>
				</h:panelGrid>
				<h:panelGrid>
					<h:outputLabel value="le compteur incrémente" for="countr" />
					<h:outputText id="countr" value="#{itemSample.counter}" />
				</h:panelGrid>
				<h:commandButton action="#{itemSample.confirm}" value="ok"></h:commandButton>
			</h:panelGrid>
		</h:form>
	</h:panelGroup>
</f:view>
</body>
</html>